<!doctype html>
<html lang="enCH">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>新联学院“十佳学生”投票系统</title>
    <link href="/static/css/index.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" type="text/css" href="/static/css/reset.css">
    <link rel="stylesheet" type="text/css" href="/static/css/main.css">
    <script type="text/javascript" src="/static/js/jquery-1.12.4.min.js"></script>
    <script type="text/javascript" src="/static/js/main.js"></script>
    <script src="/static/js/ini.js"></script>
</head>

<body>
<table cellSpacing=0 cellPadding=0 align=center width="960px">
    <tr>
        <td id="banner">"十佳学生"评选

            {% if user %} {# 已登录 {{ url_for(" user.user_info") }} #}

            <div class="user_login fr">
                <img {% if user.image_path %}
                    src="{{ user.image_path }}"
                     {% else %}
                     src="/static/images/1.jpg"
                     {% endif %}    class="lgin_pic">
                <a href="http://127.0.0.1:8000/home/index" id="nick_name">{{ user.user_name }}</a>
                <a href="javascript:;" onclick="logout()">退出</a>
            </div>

            {% else %}

            <div class="user_btns fr">
                <a href="javascript:;" class="login_btn">登录</a> / <a href="javascript:;" class="register_btn">注册</a>
            </div>

            {% endif %}

        </td>
    </tr>
    <tr>
        <td id="menu"><a href="http://127.0.0.1:8000/home/index">首页</a>

            - <a href="http://127.0.0.1:8000/home/introduce">活动介绍</a>

            - <a href="http://127.0.0.1:8000/home/rule">投票规则</a>

            - <a href="http://127.0.0.1:8000/home/affiche">系统公告</a>

            - <a href="http://127.0.0.1:8000/home/list" target="_blank">评选排行</a>

            - <a href="http://127.0.0.1:8000/home/personal" target="_blank">个人中心</a>
        </td>
    </tr>
</table>
{% if users %}
<table>
    <div>
        <form name="vote" id="vote" method="post" action='http://127.0.0.1:8000/home/index'/>
        <td>
            <table width="18%" align="center" bgcolor="#D1E3FE" style="margin:5px;">
                <tr>
                    <td colspan="2">
                        <a href="http://127.0.0.1:8000/home/rule?id={{users.id}}" target="_blank"><img src={{users.image_path}} width="175" height="150" border=0 alt="{{users.user_name}}"></a>
                    </td>
                </tr>
                <tr align="center">
                    <td colspan="2">
                       ID:{{users.id}}&nbsp&nbsp&nbsp&nbsp{{users.user_name}}</td>
                </tr>
                <tr align="center">
                    <td>排名：<span color=blue>{{1}}</span></td>
                    <td>票数：<span color=red>{{users.vote_num}}</span></td>
                </tr>
            </table>
        </td>
        </form>
        </div>
</table>
<table>

    {% if user %}
    <td>
        <button type="button" class="btn btn-success"><a href="http://127.0.0.1:8000/home/register?id={{users.id}}">投票 </a></button>
   </td>
    {% else %}
    <td>请登录后投票</td>
    {% endif %}
</table>

{% endif %}

<table width="960px" align="center" bgcolor="#F0F7FF">
 <tr>
  <td colspan="4">
   <table width="90%" align="center" cellpadding="0" cellspacing="5">
	<tr id="info">
      <td><p>&nbsp;&nbsp;&nbsp; 投票规则：</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;1、本次活动参与群体不受任何限制。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;2、本次活动投票时间从2019年4月1日起至2019年4月30日。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;3、本次活动的投票进行登录用户身份进行投票。 </p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;4、本次网络评选活动的投票采取一人一票。</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;5、在投票期结束之后，将对投票结果进行统计。详细结果请浏览---<span style="color:#0000ff;"><a href="http://127.0.0.1:8000/home/list" target="_blank">评选排行</a></span></p>
<p>&nbsp;&nbsp;&nbsp; 6、本次活动最终解释权归“十佳学生”---新联学院评选组所有。<br />
</p></td>
    </tr>
   </table>
  </td>
 </tr>
</table>

<!-- 登录表单 -->
<form class="login_form_con">
    <div class="login_form">
        <div class="login_title">
            <h3>登 录</h3>
            <a href="javascript:;" class="shutoff">关闭</a>
        </div>
        <div class="form_group">
            <input id="mobile" type="text" name="mobile" autocomplete="off">
            <div class="input_tip">手机号</div>
            <div id="login-mobile-err" class="error_tip">手机号不能为空</div>
        </div>
        <div class="form_group">
            <input id="password" type="password" name="password">
            <div class="input_tip">密码(不少于6位)</div>
            <div id="login-password-err" class="error_tip">密码不能为空</div>
        </div>
        <input type="submit" name="" value="登 录" class="input_sub">
        <div class="down_link">还没有账号？<a href="javascript:;" class="to_register">立即注册</a></div>
    </div>
    <div class="mask"></div>
</form>

<!-- 注册表单 -->
<form class="register_form_con">
    <div class="register_form">
        <div class="register_title">
            <h3>注 册</h3>
            <a href="javascript:;" class="shutoff">关闭</a>
        </div>
        <div class="form_group">
            <input type="text" name="mobile" autocomplete="off" id="register_mobile" class="phone_input">
            <div class="input_tip">手机号</div>
            <div id="register-mobile-err" class="error_tip">手机号不能为空</div>
        </div>
        <div class="form_group">
            <input type="text" name="code_pwd" id="imagecode" class="code_pwd">
            <div class="input_tip">图形验证码</div>
            <img src="../../static/news/images/pic_code.png" class="get_pic_code" onclick="generateImageCode()">
            <div id="register-image-code-err" class="error_tip">图形码不能为空</div>
        </div>
        <div class="form_group">
            <input type="text" name="smscode" id="smscode" class="code_pwd">
            <div class="input_tip">手机验证码</div>
            <a href="javascript:;" class="get_code" onclick="sendSMSCode()">点击获取验证码</a>
            <div id="register-sms-code-err" class="error_tip">验证码不能为空</div>
        </div>
        <div class="form_group">
            <input type="password" name="password" id="register_password" class="pass_input">
            <div class="input_tip">密码(不少于6位)</div>
            <div id="register-password-err" class="error_tip">密码不能为空</div>
        </div>
        <input type="submit" name="" value="注 册" class="input_sub">
        <div class="down_link">已有账号？<a href="javascript:;" class="to_login">立即登录</a></div>
    </div>
    <div class="mask"></div>
</form>


<table cellSpacing=0 cellPadding=0 align=center background="/static/images/botbj.jpg" width="960px">
    <tr>
        <td height=60 align="center" id="Bottom"><a href="https://www.xlxy.edu.cn/" target="_blank">新联学院</a> Copyright
            2018-2019 新联学院 毕业设计 &#8482;
        </td>
    </tr>
</table>
</body>
</html>